<?php use_helper('Form') ?>
<table class="statistike" cellspacing="0" cellpadding="0" border="1" width="1050" style="border-collapse: collapse; empty-cells: show;">
  <tr>
    <th colspan="7">
      <form method="post" name="sel" action="<?php echo url_for('statistike/logiranje') ?>">
        <?php echo select_tag('tip', options_for_select($profil_tips, $sf_user->getAttribute('log_search_tip'))) ?>
        <input type="text" name="username" value="<?php echo $sf_user->getAttribute('log_search_username')?>" />
        <button type="submit" class="button">Pregled</button>
      </form>
    </th>
  </tr>
  <tr>
    <th>Vreme</th>
    <th>Akcija</th>
    <th>Tip</th>
    <th>Ime</th>
    <th>Prezime</th>
    <th>Username</th>
    <th>Škola</th>
  </tr>

  <?php foreach($logiranjes as $logiranje){?>
  <tr>
    <td class="left_al"><?php echo Functions::datumSr($logiranje[0], 1) ?></td>
    <td class="left_al"><?php echo ($logiranje[1])?'login':'logout' ?></td>
    <td class="left_al"><?php echo $profil_tips[$logiranje[2]] ?></td>
    <td class="left_al"><?php echo $logiranje[3] ?></td>
    <td class="left_al"><?php echo $logiranje[4] ?></td>
    <td class="left_al"><?php echo $logiranje[5] ?></td>
    <td class="left_al"><?php echo isset($skolas[$logiranje[6]])?$skolas[$logiranje[6]]:'' ?></td>
  </tr>
  <?php }?>
</table>

<div class="pagination" style="margin-left: auto; margin-right: auto; width: 1050px;">
  <?php
  $strana = 0;
  while($strana++ <= $broj)
  {
    echo link_to($strana, 'statistike/logiranje?strana='.$strana, array('style' => 'padding: 3px;'));
  }
  ?>
</div>